const util = require("../../utils/util")
const app = getApp();

// pages/order/order.js
Page({
  data: {
    api: app.globalData.api,
    login_uid: 0,
    followlist: [], //bossname id(关注列表id) sid status(身份) uid
  },
  changeFollow(e){
    var item = e.currentTarget.dataset.item
    util.http('/follow/cancel?uid='+this.data.login_uid+'&sid='+item.sid, resp=>{
      console.log("取消关注")
      console.log(resp)
      //this.setData(this.data)
    })
    util.http('/follow/list?uid='+this.data.login_uid, resp=>{
      console.log("checke2")
      this.data.followlist = resp;
      this.setData(this.data)
      console.log("checke2")
    })
    this.setData(this.data)
  },
  onLoad(options) {
    this.data.login_uid = wx.getStorageSync('uid')
    util.http('/follow/list?uid='+this.data.login_uid, resp=>{
      console.log("关注列表")
      console.log(resp)
      this.data.followlist = resp;
      this.setData(this.data)
    })
    this.setData(this.data)
  },
})